extends ./layout.jade

block content
mixin say()
    form.well.form-inline.center(method='post', action='/post')
        input.span8(type='text', name='post')
        button.btn.btn-success(type='submit')
            i.glyphicon-comment.icon-white

mixin postLine(post)
    .span4
        h2
            a(herf='/u/#{post.user}')
            | 说
        p
            small #{post.time}
        p #{post.post}

mixin posts()
    each post in posts
        .row
            +postLine(post)

    if user
        +say()
    else
        +posts()